<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>按钮示例</title>
    <link rel="stylesheet" href="styles.css">
    <style>.button-container {
        display: flex;
        border: 1px solid #ccc;
        width: 200px;
        height: 40px;
    }
    
    .button-part {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        transition: background-color 0.3s, color 0.3s;
    }
    
    .purchase {
        background-color: white;
        color: black;
    }
    
    .cart {
        background-color: orange;
        color: white;
    }
    
    .purchase:hover {
        background-color: orange;
        color: white;
    }
    
    .cart:hover {
        background-color: white;
        color: black;
    }
    </style>
</head>
<body>
    <div class="button-container">
        <div class="button-part purchase">购买</div>
        <div class="button-part cart">加入购物车</div>
    </div>
</body>
</html>
